home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act4 / 00085.ls < prev    next >
Encoding:
Text File  |  1995-04-05  |  804 b   |  30 lines

  1. on mouseUp
  2.   global kingcolor, mycolor, lastclickon, wrongcount, CurrentBug, level1, SubBug, cursorset
  3.   set the visible of sprite 48 to 0
  4.   if cursorset then
  5.     puppetSprite(the clickOn, 1)
  6.     setcolor(the clickOn, kingcolor)
  7.     if not (lastclickon = the clickOn) then
  8.       set lastclickon to the clickOn
  9.       set wrongcount to 0
  10.     end if
  11.     set colortest to checkcolor(the clickOn, kingcolor)
  12.     if colortest = 1 then
  13.       play frame "correctcolor"
  14.     else
  15.       if colortest = 2 then
  16.         if wrongcount < 3 then
  17.           set wrongcount to wrongcount + 1
  18.         end if
  19.         play frame "wrongcolor" & wrongcount
  20.       end if
  21.     end if
  22.     if IsPictFinished() then
  23.       go("GOOD")
  24.     end if
  25.   else
  26.     play frame "no color selected"
  27.   end if
  28.   set the visible of sprite 48 to 1
  29. end
  30.